//
// Source code recreated from a .class file by IntelliJ IDEA
// (powered by FernFlower decompiler)
//

package test.集合.点名;

import java.util.ArrayList;
import java.util.Collections;
import java.util.Random;

public class 点名2 {
    public 点名2() {
    }

    public static void main(String[] args) {
        ArrayList<String> man = new ArrayList();
        Collections.addAll(man, new String[]{"man1", "man2", "man3", "man4", "man5", "man6"});
        ArrayList<String> woman = new ArrayList();
        Collections.addAll(woman, new String[]{"woman1", "woman2", "woman3", "woman4"});
        System.out.println(demo1(man, woman));
        System.out.println(demo2(man, woman));
    }

    public static String demo1(ArrayList<String> man, ArrayList<String> woman) {
        int[] ints = new int[]{1, 1, 1, 1, 1, 1, 1, 0, 0, 0};
        Random random = new Random();
        int i = ints[random.nextInt(ints.length)];
        return i == 1 ? (String)man.get(random.nextInt(man.size())) : (String)woman.get(random.nextInt(woman.size()));
    }

    public static String demo2(ArrayList<String> man, ArrayList<String> woman) {
        ArrayList<Integer> ints = new ArrayList();
        Collections.addAll(ints, new Integer[]{1, 1, 1, 1, 1, 1, 1, 0, 0, 0});
        Collections.shuffle(ints);
        Collections.shuffle(woman);
        Collections.shuffle(man);
        return (Integer)ints.get(0) == 1 ? (String)man.get(0) : (String)woman.get(0);
    }
}
